{namespace be = TYPO3\CMS\Backend\ViewHelpers}
{namespace bu = TYPO3\CMS\Beuser\ViewHelpers}

<f:for each="{onlineUser.sessions}" as="session" iteration="it">
	<tr>
		<f:if condition="{it.isFirst}">
			<f:then>
				<td class="col-icon">
					<a href="#" class="t3-js-clickmenutrigger" data-table="be_users" data-uid="{onlineUser.backendUser.uid}" data-listframe="1" title="id={onlineUser.backendUser.uid}">
						<bu:spriteIconForRecord table="be_users" object="{onlineUser.backendUser}" />
					</a>
				</td>
				<td class="col-title">
					<b>{onlineUser.backendUser.userName}</b><br />
					{onlineUser.backendUser.realName}
				</td>
			</f:then>
			<f:else>
				<td class="col-icon"></td>
				<td class="col-title"></td>
			</f:else>
		</f:if>
		<td>
			<f:format.date format="{dateFormat} {timeFormat}" date="{session.timestamp}" />
		</td>
		<td>{session.ip}</td>
		<td class="col-control">
			<div class="btn-group" role="group">
				<f:if condition="{currentSessionId} == {session.id}">
					<f:else>
						<f:link.action
							class="btn btn-default"
							action="terminateBackendUserSession"
							controller="BackendUser"
							arguments="{backendUser: onlineUser.backendUser, sessionId: session.id}"
							onclick="javascript:return confirm('{f:translate(key: 'reallyLogout')} {onlineUser.backendUser.userName}?');"
						>
							<be:spriteManagerIcon iconName="actions-document-close" />
							<f:translate key="endSession" />
						</f:link.action>
					</f:else>
				</f:if>
				<a class="btn btn-default" href="#" onclick="top.launchView('be_users', '{onlineUser.backendUser.uid}',''); return false;">
					<be:spriteManagerIcon iconName="actions-document-info" />
				</a>
			</div>
		</td>
	</tr>
</f:for>
